home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume2 / fun / nethack.d4 < prev   
Text File  |  1988-12-02  |  44KB  |  1,499 lines

  1. Path: xanth!ames!nrl-cmf!ukma!rutgers!mit-eddie!ll-xn!adelie!infinet!ulowell!page
  2. From: page@swan.ulowell.edu (Bob Page)
  3. Newsgroups: comp.sources.amiga
  4. Subject: v02i073:  nethack - D&D-like game (amiga diffs), Part04/04
  5. Message-ID: <10404@swan.ulowell.edu>
  6. Date: 1 Dec 88 23:45:50 GMT
  7. Organization: University of Lowell, Computer Science Dept.
  8. Lines: 1488
  9. Approved: page@swan.ulowell.edu
  10.  
  11. Submitted-by: u211344@hnykun11.bitnet (Olaf 'Rhialto' Seibert)
  12. Posting-number: Volume 2, Issue 73
  13. Archive-name: fun/nethack.d4
  14.  
  15. #    This is a shell archive.
  16. #    Remove everything above and including the cut line.
  17. #    Then run the rest of the file through sh.
  18. #----cut here-----cut here-----cut here-----cut here----#
  19. #!/bin/sh
  20. # shar:    Shell Archiver
  21. #    Run the following text with /bin/sh to create:
  22. #    diffs.4
  23. # This archive created: Thu Dec  1 17:55:48 1988
  24. cat << \SHAR_EOF > diffs.4
  25.  
  26. --- 9,18 -----
  27.   #include      <signal.h>
  28.   #include       "hack.h"
  29. +
  30. + #ifdef AMIGA      /* same as in amigaTermcap.c */
  31. + # define xputc(c)   WindowPutchar(c)
  32. + # define xputs(s)   WindowFPuts(s)
  33. + #endif
  34. +
  35.   extern int CO, LI;    /* usually COLNO and ROWNO+2 */
  36.   extern char *CD;
  37. ***************
  38. *** 32,36
  39.                 extern getpos();
  40.                 coord   cc;
  41. !               char    r;
  42.  
  43.                 pline ("Specify unknown object by cursor ? [ynq] ");
  44.  
  45. --- 38,43 -----
  46.                 extern getpos();
  47.                 coord   cc;
  48. !               unsigned char r;    /* OIS, for chars >= 128 */
  49. !               /* q need not be unsigned, it is same type as buf. */
  50.  
  51.                 pline ("Specify unknown object by cursor ? [ynq] ");
  52. ***************
  53. *** 339,342
  54.                 curline = 1;
  55.                 for (tl = texthead; tl; tl = tl->next_line) {
  56.   #ifdef MSDOS
  57.                     cmov (lth, curline);
  58.  
  59. --- 346,352 -----
  60.                 curline = 1;
  61.                 for (tl = texthead; tl; tl = tl->next_line) {
  62. + #ifdef AMIGA
  63. + #undef MSDOS  /* Watch out! */
  64. + #endif
  65.   #ifdef MSDOS
  66.                     cmov (lth, curline);
  67. diff -bc2 potion.c Amiga:potion.c
  68. *** potion.c    Wed May  4 15:08:50 1988
  69. --- Amiga:potion.c        Sun Jul 24 16:39:19 1988
  70. ***************
  71. *** 26,30
  72.  
  73.         /* Is there something to drink here, i.e., a fountain? */
  74. !        if (IS_FOUNTAIN(levl[u.ux][u.uy].typ)) {
  75.           pline("Drink from the fountain? [ny] ");
  76.           if(readchar() == 'y') {
  77.  
  78. --- 26,30 -----
  79.  
  80.         /* Is there something to drink here, i.e., a fountain? */
  81. !        if (IS_FOUNTAIN(RM_TYP(levl[u.ux][u.uy]))) {
  82.           pline("Drink from the fountain? [ny] ");
  83.           if(readchar() == 'y') {
  84. ***************
  85. *** 525,529
  86.   #ifdef FOUNTAINS
  87.         /* Is there something to dip into here, i.e., a fountain? */
  88. !       if (levl[u.ux][u.uy].typ == FOUNTAIN) {
  89.                 pline("Dip it in the fountain? [ny] ");
  90.                 if(readchar() == 'y') {
  91.  
  92. --- 525,529 -----
  93.   #ifdef FOUNTAINS
  94.         /* Is there something to dip into here, i.e., a fountain? */
  95. !       if (RM_TYP(levl[u.ux][u.uy]) == FOUNTAIN) {
  96.                 pline("Dip it in the fountain? [ny] ");
  97.                 if(readchar() == 'y') {
  98. diff -bc2 prisym.c Amiga:prisym.c
  99. *** prisym.c    Wed May  4 15:08:56 1988
  100. --- Amiga:prisym.c        Sun Jul 24 17:17:03 1988
  101. ***************
  102. *** 16,20
  103.                 return;
  104.         }
  105. !       if(crm->seen && crm->scrsym == ch) return;
  106.         crm->scrsym = ch;
  107.         crm->new = 1;
  108.  
  109. --- 16,20 -----
  110.                 return;
  111.         }
  112. !       if(RM_SEEN(*crm) && crm->scrsym == ch) return;
  113.         crm->scrsym = ch;
  114.         RM_SET_NEW(*crm);
  115. ***************
  116. *** 18,22
  117.         if(crm->seen && crm->scrsym == ch) return;
  118.         crm->scrsym = ch;
  119. !       crm->new = 1;
  120.         on_scr(x,y);
  121.   }
  122.  
  123. --- 18,22 -----
  124.         if(RM_SEEN(*crm) && crm->scrsym == ch) return;
  125.         crm->scrsym = ch;
  126. !       RM_SET_NEW(*crm);
  127.         on_scr(x,y);
  128.   }
  129. ***************
  130. *** 98,102
  131.                 tc[cnt].y = y;
  132.                 if(++cnt >= COLNO) panic("Tmp_at overflow?");
  133. !               levl[x][y].new = 0;     /* prevent pline-nscr erasing --- */
  134.         }
  135.   }
  136.  
  137. --- 98,102 -----
  138.                 tc[cnt].y = y;
  139.                 if(++cnt >= COLNO) panic("Tmp_at overflow?");
  140. !               RM_CLR_NEW(levl[x][y]); /* prevent pline-nscr erasing --- */
  141.         }
  142.   }
  143. ***************
  144. *** 109,113
  145.   {
  146.         if(u.udispl && (Invisible || u.udisx != u.ux || u.udisy != u.uy))
  147. !               /* if(! levl[u.udisx][u.udisy].new) */
  148.                         if(!vism_at(u.udisx, u.udisy))
  149.                                 newsym(u.udisx, u.udisy);
  150.  
  151. --- 109,113 -----
  152.   {
  153.         if(u.udispl && (Invisible || u.udisx != u.ux || u.udisy != u.uy))
  154. !               /* if(! RM_NEW(levl[u.udisx][u.udisy])) */
  155.                         if(!vism_at(u.udisx, u.udisy))
  156.                                 newsym(u.udisx, u.udisy);
  157. ***************
  158. *** 122,126
  159.                 u.udisy = u.uy;
  160.         }
  161. !       levl[u.ux][u.uy].seen = 1;
  162.   }
  163.  
  164.  
  165. --- 122,126 -----
  166.                 u.udisy = u.uy;
  167.         }
  168. !       RM_SET_SEEN(levl[u.ux][u.uy]);
  169.   }
  170.  
  171. ***************
  172. *** 144,149
  173.         if(!isok(x,y)) return;
  174.         room = &levl[x][y];
  175. !       if((!room->typ) ||
  176. !          (IS_ROCK(room->typ) && levl[u.ux][u.uy].typ == CORR))
  177.                 return;
  178.         if((mtmp = m_at(x,y)) && !mtmp->mhide &&
  179.  
  180. --- 144,149 -----
  181.         if(!isok(x,y)) return;
  182.         room = &levl[x][y];
  183. !       if((!RM_TYP(*room)) ||
  184. !          (IS_ROCK(RM_TYP(*room)) && RM_TYP(levl[u.ux][u.uy]) == CORR))
  185.                 return;
  186.         if((mtmp = m_at(x,y)) && !mtmp->mhide &&
  187. ***************
  188. *** 156,160
  189.                 pmon(mtmp);
  190.         }
  191. !       else if((otmp = o_at(x,y)) && room->typ != POOL)
  192.                 atl(x,y,Hallucination ? rndobjsym() : otmp->olet);
  193.   #ifdef SPIDERS
  194.  
  195. --- 156,160 -----
  196.                 pmon(mtmp);
  197.         }
  198. !       else if((otmp = o_at(x,y)) && RM_TYP(*room) != POOL)
  199.                 atl(x,y,Hallucination ? rndobjsym() : otmp->olet);
  200.   #ifdef SPIDERS
  201. ***************
  202. *** 168,172
  203.                 pmon(mtmp);
  204.         }
  205. !       else if(g_at(x,y) && room->typ != POOL)
  206.                 atl(x,y,Hallucination ? rndobjsym() : GOLD_SYM);
  207.         else if(!room->seen || room->scrsym == STONE_SYM) {
  208.  
  209. --- 168,172 -----
  210.                 pmon(mtmp);
  211.         }
  212. !       else if(g_at(x,y) && RM_TYP(*room) != POOL)
  213.                 atl(x,y,Hallucination ? rndobjsym() : GOLD_SYM);
  214.         else if(!RM_SEEN(*room) || room->scrsym == STONE_SYM) {
  215. ***************
  216. *** 170,175
  217.         else if(g_at(x,y) && room->typ != POOL)
  218.                 atl(x,y,Hallucination ? rndobjsym() : GOLD_SYM);
  219. !       else if(!room->seen || room->scrsym == STONE_SYM) {
  220. !               room->new = room->seen = 1;
  221.                 newsym(x,y);
  222.                 on_scr(x,y);
  223.  
  224. --- 170,177 -----
  225.         else if(g_at(x,y) && RM_TYP(*room) != POOL)
  226.                 atl(x,y,Hallucination ? rndobjsym() : GOLD_SYM);
  227. !       else if(!RM_SEEN(*room) || room->scrsym == STONE_SYM) {
  228. !               /* room->new = room->seen = 1; */
  229. !               RM_SET_NEW(*room);
  230. !               RM_SET_SEEN(*room);
  231.                 newsym(x,y);
  232.                 on_scr(x,y);
  233. ***************
  234. *** 175,179
  235.                 on_scr(x,y);
  236.         }
  237. !       room->seen = 1;
  238.   }
  239.  
  240.  
  241. --- 177,181 -----
  242.                 on_scr(x,y);
  243.         }
  244. !       RM_SET_SEEN(*room);
  245.   }
  246.  
  247. ***************
  248. *** 185,189
  249.         register struct trap *ttmp;
  250.         struct rm *room;
  251. !       register char tmp;
  252.  
  253.         room = &levl[x][y];
  254.  
  255. --- 187,191 -----
  256.         register struct trap *ttmp;
  257.         struct rm *room;
  258. !       register unsigned char tmp; /* OIS: don't compare char with uchar */
  259.  
  260.         room = &levl[x][y];
  261. ***************
  262. *** 188,193
  263.  
  264.         room = &levl[x][y];
  265. !       if(!room->seen) tmp = STONE_SYM;
  266. !       else if(room->typ == POOL) tmp = POOL_SYM;
  267.         else if(!Blind && (otmp = o_at(x,y)))
  268.                 tmp = Hallucination ? rndobjsym() : otmp->olet;
  269.  
  270. --- 190,195 -----
  271.  
  272.         room = &levl[x][y];
  273. !       if(!RM_SEEN(*room)) tmp = STONE_SYM;
  274. !       else if (RM_TYP(*room) == POOL) tmp = POOL_SYM;
  275.         else if(!Blind && (otmp = o_at(x,y)))
  276.                 tmp = Hallucination ? rndobjsym() : otmp->olet;
  277. ***************
  278. *** 202,206
  279.         else if((ttmp = t_at(x,y)) && ttmp->tseen) tmp = TRAP_SYM;
  280.   #endif
  281. !       else switch(room->typ) {
  282.         case SCORR:
  283.         case SDOOR:
  284.  
  285. --- 204,208 -----
  286.         else if((ttmp = t_at(x,y)) && ttmp->tseen) tmp = TRAP_SYM;
  287.   #endif
  288. !       else switch (RM_TYP(*room)) {
  289.         case SCORR:
  290.         case SDOOR:
  291. ***************
  292. *** 223,227
  293.                 break;
  294.         case ROOM:
  295. !               if(room->lit || cansee(x,y) || Blind) tmp = ROOM_SYM;
  296.                 else tmp = STONE_SYM;
  297.                 break;
  298.  
  299. --- 225,229 -----
  300.                 break;
  301.         case ROOM:
  302. !               if(RM_LIT(*room) || cansee(x,y) || Blind) tmp = ROOM_SYM;
  303.                 else tmp = STONE_SYM;
  304.                 break;
  305. ***************
  306. *** 264,268
  307.   {
  308.         register struct rm *room;
  309. !       char newscrsym;
  310.  
  311.         if(!vism_at(x,y)) {
  312.  
  313. --- 266,270 -----
  314.   {
  315.         register struct rm *room;
  316. !       unsigned char newscrsym;    /* OIS */
  317.  
  318.         if(!vism_at(x,y)) {
  319. ***************
  320. *** 271,275
  321.                 if(room->scrsym != newscrsym) {
  322.                         room->scrsym = newscrsym;
  323. !                       room->seen = 0;
  324.                 }
  325.         }
  326.  
  327. --- 273,277 -----
  328.                 if(room->scrsym != newscrsym) {
  329.                         room->scrsym = newscrsym;
  330. !                       RM_CLR_SEEN(*room);
  331.                 }
  332.         }
  333. ***************
  334. *** 283,289
  335.         if(!isok(x,y)) return;
  336.         room = &levl[x][y];
  337. !       if(room->scrsym == ROOM_SYM && !room->lit && !Blind) {
  338. !               room->scrsym = ' ';
  339. !               room->new = 1;
  340.                 on_scr(x,y);
  341.         }
  342.  
  343. --- 285,292 -----
  344.         if(!isok(x,y)) return;
  345.         room = &levl[x][y];
  346. !       if(room->scrsym == ROOM_SYM && !RM_LIT(*room) && !Blind) {
  347. !               room->scrsym = STONE_SYM;    /* OIS, was ' ' */
  348. !               /* Otherwise a STONE_SYM != 32 looks so stupid */
  349. !               RM_SET_NEW(*room);
  350.                 on_scr(x,y);
  351.         }
  352. diff -bc2 read.c Amiga:read.c
  353. *** read.c      Wed May  4 15:08:58 1988
  354. --- Amiga:read.c  Sun Jul 24 17:26:08 1988
  355. ***************
  356. *** 419,423
  357.                     if(!confused || rn2(7))
  358.                         if(!cansee(zx,zy))
  359. !                           levl[zx][zy].seen = 0;
  360.                 docrt();
  361.                 pline("Who was that Maude person anyway?");
  362.  
  363. --- 419,423 -----
  364.                     if(!confused || rn2(7))
  365.                         if(!cansee(zx,zy))
  366. !                           RM_CLR_SEEN(levl[zx][zy]);
  367.                 docrt();
  368.                 pline("Who was that Maude person anyway?");
  369. ***************
  370. *** 519,524
  371.         if(Blind) goto do_it;
  372.         if(!on) {
  373. !               if(u.uswallow || !xdnstair || levl[u.ux][u.uy].typ == CORR ||
  374. !                   !levl[u.ux][u.uy].lit) {
  375.                         pline("It seems even darker in here than before.");
  376.                         return;
  377.  
  378. --- 519,524 -----
  379.         if(Blind) goto do_it;
  380.         if(!on) {
  381. !               if(u.uswallow || !xdnstair || RM_TYP(levl[u.ux][u.uy]) == CORR
  382. ||
  383. !                   !RM_LIT(levl[u.ux][u.uy])) {
  384.                         pline("It seems even darker in here than before.");
  385.                         return;
  386. ***************
  387. *** 538,542
  388.                 return;
  389.   #else
  390. !               if(levl[u.ux][u.uy].typ == CORR) {
  391.                     pline("The corridor lights up around you, then fades.");
  392.                     return;
  393.  
  394. --- 538,542 -----
  395.                 return;
  396.   #else
  397. !               if(RM_TYP(levl[u.ux][u.uy]) == CORR) {
  398.                     pline("The corridor lights up around you, then fades.");
  399.                     return;
  400. ***************
  401. *** 541,545
  402.                     pline("The corridor lights up around you, then fades.");
  403.                     return;
  404. !               } else if(levl[u.ux][u.uy].lit) {
  405.                     pline("The light here seems better now.");
  406.                     return;
  407.  
  408. --- 541,545 -----
  409.                     pline("The corridor lights up around you, then fades.");
  410.                     return;
  411. !               } else if(RM_LIT(levl[u.ux][u.uy])) {
  412.                     pline("The light here seems better now.");
  413.                     return;
  414. ***************
  415. *** 553,557
  416.         return;
  417.   #else
  418. !       if(levl[u.ux][u.uy].lit == on)
  419.                 return;
  420.         if(levl[u.ux][u.uy].typ == DOOR) {
  421.  
  422. --- 553,560 -----
  423.         return;
  424.   #else
  425. ! # ifdef RM_LITM
  426. !       if (on) on = RM_LITM;   /* OIS, for AMIGA */
  427. ! # endif
  428. !       if(RM_LIT(levl[u.ux][u.uy]) == on)
  429.                 return;
  430.         if(RM_TYP(levl[u.ux][u.uy]) == DOOR) {
  431. ***************
  432. *** 555,561
  433.         if(levl[u.ux][u.uy].lit == on)
  434.                 return;
  435. !       if(levl[u.ux][u.uy].typ == DOOR) {
  436. !               if(IS_ROOM(levl[u.ux][u.uy+1].typ)) zy = u.uy+1;
  437. !               else if(IS_ROOM(levl[u.ux][u.uy-1].typ)) zy = u.uy-1;
  438.                 else zy = u.uy;
  439.                 if(IS_ROOM(levl[u.ux+1][u.uy].typ)) zx = u.ux+1;
  440.  
  441. --- 558,564 -----
  442.         if(RM_LIT(levl[u.ux][u.uy]) == on)
  443.                 return;
  444. !       if(RM_TYP(levl[u.ux][u.uy]) == DOOR) {
  445. !               if(IS_ROOM(RM_TYP(levl[u.ux][u.uy+1]))) zy = u.uy+1;
  446. !               else if(IS_ROOM(RM_TYP(levl[u.ux][u.uy-1]))) zy = u.uy-1;
  447.                 else zy = u.uy;
  448.                 if(IS_ROOM(RM_TYP(levl[u.ux+1][u.uy]))) zx = u.ux+1;
  449. ***************
  450. *** 559,564
  451.                 else if(IS_ROOM(levl[u.ux][u.uy-1].typ)) zy = u.uy-1;
  452.                 else zy = u.uy;
  453. !               if(IS_ROOM(levl[u.ux+1][u.uy].typ)) zx = u.ux+1;
  454. !               else if(IS_ROOM(levl[u.ux-1][u.uy].typ)) zx = u.ux-1;
  455.                 else zx = u.ux;
  456.         } else {
  457.  
  458. --- 562,567 -----
  459.                 else if(IS_ROOM(RM_TYP(levl[u.ux][u.uy-1]))) zy = u.uy-1;
  460.                 else zy = u.uy;
  461. !               if(IS_ROOM(RM_TYP(levl[u.ux+1][u.uy]))) zx = u.ux+1;
  462. !               else if(IS_ROOM(RM_TYP(levl[u.ux-1][u.uy]))) zx = u.ux-1;
  463.                 else zx = u.ux;
  464.         } else {
  465. ***************
  466. *** 566,570
  467.                 zy = u.uy;
  468.         }
  469. !       for(seelx = u.ux; (num = levl[seelx-1][zy].typ) != CORR && num != 0;
  470.                 seelx--);
  471.         for(seehx = u.ux; (num = levl[seehx+1][zy].typ) != CORR && num != 0;
  472.  
  473. --- 569,573 -----
  474.                 zy = u.uy;
  475.         }
  476. !       for(seelx = u.ux; (num = RM_TYP(levl[seelx-1][zy])) != CORR && num != 0;
  477.                 seelx--);
  478.         for(seehx = u.ux; (num = RM_TYP(levl[seehx+1][zy])) != CORR && num != 0;
  479. ***************
  480. *** 568,572
  481.         for(seelx = u.ux; (num = levl[seelx-1][zy].typ) != CORR && num != 0;
  482.                 seelx--);
  483. !       for(seehx = u.ux; (num = levl[seehx+1][zy].typ) != CORR && num != 0;
  484.                 seehx++);
  485.         for(seely = u.uy; (num = levl[zx][seely-1].typ) != CORR && num != 0;
  486.  
  487. --- 571,575 -----
  488.         for(seelx = u.ux; (num = RM_TYP(levl[seelx-1][zy])) != CORR && num != 0;
  489.                 seelx--);
  490. !       for(seehx = u.ux; (num = RM_TYP(levl[seehx+1][zy])) != CORR && num != 0;
  491.                 seehx++);
  492.         for(seely = u.uy; (num = RM_TYP(levl[zx][seely-1])) != CORR && num != 0;
  493. ***************
  494. *** 570,574
  495.         for(seehx = u.ux; (num = levl[seehx+1][zy].typ) != CORR && num != 0;
  496.                 seehx++);
  497. !       for(seely = u.uy; (num = levl[zx][seely-1].typ) != CORR && num != 0;
  498.                 seely--);
  499.         for(seehy = u.uy; (num = levl[zx][seehy+1].typ) != CORR && num != 0;
  500.  
  501. --- 573,577 -----
  502.         for(seehx = u.ux; (num = RM_TYP(levl[seehx+1][zy])) != CORR && num != 0;
  503.                 seehx++);
  504. !       for(seely = u.uy; (num = RM_TYP(levl[zx][seely-1])) != CORR && num != 0;
  505.                 seely--);
  506.         for(seehy = u.uy; (num = RM_TYP(levl[zx][seehy+1])) != CORR && num != 0;
  507. ***************
  508. *** 572,576
  509.         for(seely = u.uy; (num = levl[zx][seely-1].typ) != CORR && num != 0;
  510.                 seely--);
  511. !       for(seehy = u.uy; (num = levl[zx][seehy+1].typ) != CORR && num != 0;
  512.                 seehy++);
  513.         for(zy = seely; zy <= seehy; zy++)
  514.  
  515. --- 575,579 -----
  516.         for(seely = u.uy; (num = RM_TYP(levl[zx][seely-1])) != CORR && num != 0;
  517.                 seely--);
  518. !       for(seehy = u.uy; (num = RM_TYP(levl[zx][seehy+1])) != CORR && num != 0;
  519.                 seehy++);
  520.         for(zy = seely; zy <= seehy; zy++)
  521. ***************
  522. *** 576,579
  523.         for(zy = seely; zy <= seehy; zy++)
  524.                 for(zx = seelx; zx <= seehx; zx++) {
  525.                         levl[zx][zy].lit = on;
  526.                         if(!Blind && dist(zx,zy) > 2)
  527.  
  528. --- 579,588 -----
  529.         for(zy = seely; zy <= seehy; zy++)
  530.                 for(zx = seelx; zx <= seehx; zx++) {
  531. + # ifdef BITFIELD_BUG      /* for AMIGA */
  532. +                       if (on)
  533. +                               RM_SET_LIT(levl[zx][zy]);
  534. +                       else
  535. +                               RM_CLR_LIT(levl[zx][zy]);
  536. + # else
  537.                         levl[zx][zy].lit = on;
  538.   # endif
  539. ***************
  540. *** 577,580
  541.                 for(zx = seelx; zx <= seehx; zx++) {
  542.                         levl[zx][zy].lit = on;
  543.                         if(!Blind && dist(zx,zy) > 2)
  544.                                 if(on) prl(zx,zy); else nosee(zx,zy);
  545.  
  546. --- 586,590 -----
  547.   # else
  548.                         levl[zx][zy].lit = on;
  549. + # endif
  550.                         if(!Blind && dist(zx,zy) > 2)
  551.                                 if(on) prl(zx,zy); else nosee(zx,zy);
  552. ***************
  553. *** 653,657
  554.                 if((Confusion != 0) && rn2(7)) continue;
  555.                 lev = &(levl[zx][zy]);
  556. !               if((num = lev->typ) == 0)       continue;
  557.  
  558.                 if(num == SCORR) {
  559.  
  560. --- 663,667 -----
  561.                 if((Confusion != 0) && rn2(7)) continue;
  562.                 lev = &(levl[zx][zy]);
  563. !               if((num = RM_TYP(*lev)) == 0)   continue;
  564.  
  565.                 if(num == SCORR) {
  566. ***************
  567. *** 656,660
  568.  
  569.                 if(num == SCORR) {
  570. !                       lev->typ = CORR;
  571.                         lev->scrsym = CORR_SYM;
  572.                 } else  if(num == SDOOR) {
  573.  
  574. --- 666,670 -----
  575.  
  576.                 if(num == SCORR) {
  577. !                       RM_SET_TYP(*lev, CORR);
  578.                         lev->scrsym = CORR_SYM;
  579.                 } else  if(num == SDOOR) {
  580. ***************
  581. *** 659,663
  582.                         lev->scrsym = CORR_SYM;
  583.                 } else  if(num == SDOOR) {
  584. !                       lev->typ = DOOR;
  585.                         lev->scrsym = DOOR_SYM;
  586.                 /* do sth in doors ? */
  587.  
  588. --- 669,673 -----
  589.                         lev->scrsym = CORR_SYM;
  590.                 } else  if(num == SDOOR) {
  591. !                       RM_SET_TYP(*lev, DOOR);
  592.                         lev->scrsym = DOOR_SYM;
  593.                 /* do sth in doors ? */
  594. ***************
  595. *** 662,666
  596.                         lev->scrsym = DOOR_SYM;
  597.                 /* do sth in doors ? */
  598. !               } else if(lev->seen) continue;
  599.   #ifndef QUEST
  600.                 if(num != ROOM)
  601.  
  602. --- 672,676 -----
  603.                         lev->scrsym = DOOR_SYM;
  604.                 /* do sth in doors ? */
  605. !               } else if (RM_SEEN(*lev)) continue;
  606.   #ifndef QUEST
  607.                 if(num != ROOM)
  608. ***************
  609. *** 667,671
  610.   #endif
  611.                 {
  612. !                       lev->seen = lev->new = 1;
  613.                         if(lev->scrsym == STONE_SYM || !lev->scrsym)
  614.                                 newsym(zx,zy);
  615.  
  616. --- 677,683 -----
  617.   #endif
  618.                 {
  619. !                       /* lev->seen = lev->new = 1; */
  620. !                       RM_SET_SEEN(*lev);
  621. !                       RM_SET_NEW(*lev);
  622.                         if(lev->scrsym == STONE_SYM || !lev->scrsym)
  623.                                 newsym(zx,zy);
  624. diff -bc2 save.c Amiga:save.c
  625. *** save.c      Wed May  4 15:09:02 1988
  626. --- Amiga:save.c  Thu Aug  4 02:05:07 1988
  627. ***************
  628. *** 23,26
  629.                 exit(0);
  630.         }
  631.   #ifdef LINT
  632.         return(0);
  633.  
  634. --- 23,27 -----
  635.                 exit(0);
  636.         }
  637. +       docrt();    /* Redraw screen */
  638.   #ifdef LINT
  639.         return(0);
  640. ***************
  641. *** 53,57
  642.         if (!saveDiskPrompt(0))
  643.                 return 0;
  644. !       fd = open(SAVEF, O_WRONLY | O_BINARY | O_CREAT, FMASK);
  645.   #else
  646.         fd = creat(SAVEF, FMASK);
  647.  
  648. --- 54,58 -----
  649.         if (!saveDiskPrompt(0))
  650.                 return 0;
  651. !       fd = open(SAVEF, O_WRONLY | O_BINARY | O_CREAT | O_TRUNC, FMASK);
  652.   #else
  653.         fd = creat(SAVEF, FMASK);
  654. ***************
  655. *** 101,104
  656.   #ifdef DGK
  657.         if (mode == COUNT) {
  658.                 /* make sure there is enough disk space */
  659.                 needed = bytes_counted;
  660.  
  661. --- 102,108 -----
  662.   #ifdef DGK
  663.         if (mode == COUNT) {
  664. + #ifdef COMPRESS
  665. +               bflush(fd);
  666. + #endif
  667.                 /* make sure there is enough disk space */
  668.                 needed = bytes_counted;
  669. ***************
  670. *** 142,145
  671.                     return(0);
  672.                 }
  673.                 getlev(ofd, hackpid, tmp);
  674.                 (void) close(ofd);
  675.  
  676. --- 146,152 -----
  677.                     return(0);
  678.                 }
  679. + #ifdef COMPRESS
  680. +               minit();
  681. + #endif
  682.                 getlev(ofd, hackpid, tmp);
  683.                 (void) close(ofd);
  684. ***************
  685. *** 152,155
  686.                 (void) unlink(lock);
  687.         }
  688.         (void) close(fd);
  689.         glo(dlevel);
  690.  
  691. --- 159,165 -----
  692.                 (void) unlink(lock);
  693.         }
  694. + #ifdef COMPRESS
  695. +       bflush(fd);
  696. + #endif
  697.         (void) close(fd);
  698.         glo(dlevel);
  699. ***************
  700. *** 173,176
  701.         oldflags = flags;       /* Save flags set in the config file */
  702.   #endif
  703.         restoring = TRUE;
  704.         getlev(fd, 0, 0);
  705.  
  706. --- 183,189 -----
  707.         oldflags = flags;       /* Save flags set in the config file */
  708.   #endif
  709. + #ifdef COMPRESS
  710. +       minit();
  711. + #endif
  712.         restoring = TRUE;
  713.         getlev(fd, 0, 0);
  714. ***************
  715. *** 230,234
  716.   #endif
  717.         while(1) {
  718. !               if(read(fd, (char *) &tmp, sizeof tmp) != sizeof tmp)
  719.                         break;
  720.                 getlev(fd, 0, tmp);
  721.  
  722. --- 243,251 -----
  723.   #endif
  724.         while(1) {
  725. ! #ifdef COMPRESS
  726. !               if(mread(fd, (char *) &tmp, sizeof tmp) < 0) /*level #*/
  727. ! #else
  728. !               if(read(fd, (char *) &tmp, sizeof tmp) != sizeof tmp) /*level
  729. #*/
  730. ! #endif
  731.                         break;
  732.                 getlev(fd, 0, tmp);
  733. ***************
  734. *** 274,277
  735.                 savelev(nfd,tmp);
  736.   #endif
  737.                 (void) close(nfd);
  738.         }
  739.  
  740. --- 291,297 -----
  741.                 savelev(nfd,tmp);
  742.   #endif
  743. + #ifdef COMPRESS
  744. +               bflush(nfd);
  745. + #endif
  746.                 (void) close(nfd);
  747.         }
  748. ***************
  749. *** 277,280
  750.         }
  751.         (void) lseek(fd, 0L, 0);
  752.         getlev(fd, 0, 0);
  753.         (void) close(fd);
  754.  
  755. --- 297,303 -----
  756.         }
  757.         (void) lseek(fd, 0L, 0);
  758. + #ifdef COMPRESS
  759. +       minit();
  760. + #endif
  761.         getlev(fd, 0, 0);
  762.         (void) close(fd);
  763. diff -bc2 shk.c Amiga:shk.c
  764. *** shk.c       Wed May  4 15:09:04 1988
  765. --- Amiga:shk.c   Sun Jul 24 17:58:35 1988
  766. ***************
  767. *** 1021,1025
  768.                 nx = poss[i].x;
  769.                 ny = poss[i].y;
  770. !               if(levl[nx][ny].typ == ROOM
  771.                 || shkroom != ESHK(shkp)->shoproom
  772.                 || ESHK(shkp)->following) {
  773.  
  774. --- 1021,1025 -----
  775.                 nx = poss[i].x;
  776.                 ny = poss[i].y;
  777. !               if (RM_TYP(levl[nx][ny]) == ROOM
  778.                 || shkroom != ESHK(shkp)->shoproom
  779.                 || ESHK(shkp)->following) {
  780. diff -bc2 shknam.c Amiga:shknam.c
  781. No differences encountered
  782. diff -bc2 spell.c Amiga:spell.c
  783. No differences encountered
  784. diff -bc2 topten.c Amiga:topten.c
  785. *** topten.c    Tue May  3 16:58:12 1988
  786. --- Amiga:topten.c        Thu Aug  4 19:10:55 1988
  787. ***************
  788. *** 57,60
  789.   #endif
  790.  
  791.   #ifndef DGK
  792.   #define       HUP     if(!done_hup)
  793.  
  794. --- 57,64 -----
  795.   #endif
  796.  
  797. + #ifdef AMIGA
  798. +       curx = FAR; /* Prevent screen from closing too fast */
  799. + #endif
  800. +
  801.   #ifndef DGK
  802.   #define HUP   if(!done_hup)
  803. ***************
  804. *** 103,106
  805.                 t0->points = 0;
  806.   #ifdef LOGFILE                /* used for debugging (who dies of what, where)
  807. */
  808.         while(link(lgfile, loglock) == -1) {
  809.                 HUP perror(loglock);
  810.  
  811. --- 107,111 -----
  812.                 t0->points = 0;
  813.   #ifdef LOGFILE                /* used for debugging (who dies of what, where)
  814. */
  815. + # ifdef UNIX
  816.         while(link(lgfile, loglock) == -1) {
  817.                 HUP perror(loglock);
  818. ***************
  819. *** 115,118
  820.                 sleep(1);
  821.         }
  822.         if(!(lfile = fopen(lgfile,"a"))){
  823.                 HUP puts("Cannot open log file!");
  824.  
  825. --- 120,124 -----
  826.                 sleep(1);
  827.         }
  828. + # endif
  829.         if(!(lfile = fopen(lgfile,"a"))){
  830.                 HUP puts("Cannot open log file!");
  831. ***************
  832. *** 125,128
  833.             t0->plchar, t0->sex, t0->name, t0->death);
  834.         fclose(lfile);
  835.         (void) unlink(loglock);
  836.         lgend:;
  837.  
  838. --- 131,135 -----
  839.             t0->plchar, t0->sex, t0->name, t0->death);
  840.         fclose(lfile);
  841. + # ifdef UNIX
  842.         (void) unlink(loglock);
  843.   # endif
  844. ***************
  845. *** 126,129
  846.         fclose(lfile);
  847.         (void) unlink(loglock);
  848.         lgend:;
  849.   #endif
  850.  
  851. --- 133,137 -----
  852.   # ifdef UNIX
  853.         (void) unlink(loglock);
  854. + # endif
  855.         lgend:;
  856.   #endif
  857. ***************
  858. *** 331,334
  859.           *bp = 0;
  860.           standoutbeg();
  861.           fputs(linebuf,stdout);
  862.           standoutend();
  863.  
  864. --- 339,345 -----
  865.           *bp = 0;
  866.           standoutbeg();
  867. + #ifdef stdout_puts    /* For AMIGA */
  868. +         stdout_puts(linebuf);
  869. + #else
  870.           fputs(linebuf,stdout);
  871.   #endif
  872. ***************
  873. *** 332,335
  874.           standoutbeg();
  875.           fputs(linebuf,stdout);
  876.           standoutend();
  877.           (void) putchar('\n');
  878.  
  879. --- 343,347 -----
  880.   #else
  881.           fputs(linebuf,stdout);
  882. + #endif
  883.           standoutend();
  884.           (void) putchar('\n');
  885. ***************
  886. *** 385,388
  887.   #else
  888.         char *player0;
  889.   #endif
  890.  
  891.  
  892. --- 397,403 -----
  893.   #else
  894.         char *player0;
  895. + #endif
  896. + #ifdef AMIGA
  897. +       curx = FAR; /* Prevent screen from closing too fast */
  898.   #endif
  899.  
  900. diff -bc2 trap.c Amiga:trap.c
  901. *** trap.c      Wed May  4 15:09:12 1988
  902. --- Amiga:trap.c  Sun Jul 24 21:12:09 1988
  903. ***************
  904. *** 253,257
  905.                         break;
  906.   #endif
  907. ! #if defined(RPH) && defined(KAA)
  908.                 case POLY_TRAP:
  909.                             pline("You feel a change coming over you.");
  910.  
  911. --- 253,259 -----
  912.                         break;
  913.   #endif
  914. ! /* #if defined(RPH) && defined(KAA) */
  915. ! #ifdef RPH
  916. ! # ifdef KAA
  917.                 case POLY_TRAP:
  918.                             pline("You feel a change coming over you.");
  919. ***************
  920. *** 259,262
  921.                             deltrap(trap);
  922.                             break;
  923.   #endif
  924.   #ifdef NEWTRAPS
  925.  
  926. --- 261,265 -----
  927.                             deltrap(trap);
  928.                             break;
  929. + # endif
  930.   #endif
  931.   #ifdef NEWTRAPS
  932. ***************
  933. *** 532,536
  934.  
  935.         /* check for falling into pool - added by GAN 10/20/86 */
  936. !       if(IS_POOL(levl[u.ux][u.uy].typ) && !Levitation)
  937.                 drown();
  938.  
  939.  
  940. --- 535,539 -----
  941.  
  942.         /* check for falling into pool - added by GAN 10/20/86 */
  943. !       if(IS_POOL(RM_TYP(levl[u.ux][u.uy])) && !Levitation)
  944.                 drown();
  945.  
  946. ***************
  947. *** 636,640
  948.         }
  949.         nomul(0);
  950. !       if(IS_POOL(levl[nux][nuy].typ) && !Levitation)
  951.                 drown();
  952.         (void) inshop();
  953.  
  954. --- 639,643 -----
  955.         }
  956.         nomul(0);
  957. !       if(IS_POOL(RM_TYP(levl[nux][nuy])) && !Levitation)
  958.                 drown();
  959.         (void) inshop();
  960. ***************
  961. *** 648,652
  962.   #ifdef STUPID
  963.         boolean tmp1, tmp2, tmp3;
  964. !       tmp1 = isok(x,y) && !IS_ROCK(levl[x][y].typ) && !m_at(x,y);
  965.         tmp2 = !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y);
  966.         tmp3 = !(IS_POOL(levl[x][y].typ) && !Levitation);
  967.  
  968. --- 651,655 -----
  969.   #ifdef STUPID
  970.         boolean tmp1, tmp2, tmp3;
  971. !       tmp1 = isok(x,y) && !IS_ROCK(RM_TYP(levl[x][y])) && !m_at(x,y);
  972.         tmp2 = !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y);
  973.         tmp3 = !(IS_POOL(RM_TYP(levl[x][y])) && !Levitation);
  974. ***************
  975. *** 650,654
  976.         tmp1 = isok(x,y) && !IS_ROCK(levl[x][y].typ) && !m_at(x,y);
  977.         tmp2 = !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y);
  978. !       tmp3 = !(IS_POOL(levl[x][y].typ) && !Levitation);
  979.         return(tmp1 && tmp2 && tmp3);
  980.   #else
  981.  
  982. --- 653,657 -----
  983.         tmp1 = isok(x,y) && !IS_ROCK(RM_TYP(levl[x][y])) && !m_at(x,y);
  984.         tmp2 = !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y);
  985. !       tmp3 = !(IS_POOL(RM_TYP(levl[x][y])) && !Levitation);
  986.         return(tmp1 && tmp2 && tmp3);
  987.   #else
  988. ***************
  989. *** 653,657
  990.         return(tmp1 && tmp2 && tmp3);
  991.   #else
  992. !       return( isok(x,y) && !IS_ROCK(levl[x][y].typ) && !m_at(x,y) &&
  993.                 !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y) &&
  994.                 !(IS_POOL(levl[x][y].typ) && !Levitation)
  995.  
  996. --- 656,660 -----
  997.         return(tmp1 && tmp2 && tmp3);
  998.   #else
  999. !       return( isok(x,y) && !IS_ROCK(RM_TYP(levl[x][y])) && !m_at(x,y) &&
  1000.                 !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y) &&
  1001.                 !(IS_POOL(RM_TYP(levl[x][y])) && !Levitation)
  1002. ***************
  1003. *** 655,659
  1004.         return( isok(x,y) && !IS_ROCK(levl[x][y].typ) && !m_at(x,y) &&
  1005.                 !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y) &&
  1006. !               !(IS_POOL(levl[x][y].typ) && !Levitation)
  1007.         );
  1008.   #endif
  1009.  
  1010. --- 658,662 -----
  1011.         return( isok(x,y) && !IS_ROCK(RM_TYP(levl[x][y])) && !m_at(x,y) &&
  1012.                 !sobj_at(ENORMOUS_ROCK,x,y) && !t_at(x,y) &&
  1013. !               !(IS_POOL(RM_TYP(levl[x][y])) && !Levitation)
  1014.         );
  1015.   #endif
  1016. ***************
  1017. *** 911,915
  1018.                 pline("You attempt a teleport spell."); /* utcsri!carroll */
  1019.                 (void) dotele();
  1020. !               if(!IS_POOL(levl[u.ux][u.uy].typ)) return;
  1021.         }
  1022.         pline("You drown.");
  1023.  
  1024. --- 914,918 -----
  1025.                 pline("You attempt a teleport spell."); /* utcsri!carroll */
  1026.                 (void) dotele();
  1027. !               if(!IS_POOL(RM_TYP(levl[u.ux][u.uy]))) return;
  1028.         }
  1029.         pline("You drown.");
  1030. diff -bc2 u_init.c Amiga:u_init.c
  1031. *** u_init.c    Wed May  4 15:09:14 1988
  1032. --- Amiga:u_init.c        Mon Jul 25 23:19:17 1988
  1033. ***************
  1034. *** 316,319
  1035.         u.uhorizon = 6;
  1036.   #endif
  1037.         switch(pc) {
  1038.         case 'c':
  1039.  
  1040. --- 316,323 -----
  1041.         u.uhorizon = 6;
  1042.   #endif
  1043. + /*
  1044. +  *  On the AMIGA, this switch would produce a jump table that is too
  1045. +  *  large for pc-relative addressing... Besides, pc is in uppercase.
  1046. +  */
  1047.         switch(pc) {
  1048.         /* case 'c': */
  1049. ***************
  1050. *** 317,321
  1051.   #endif
  1052.         switch(pc) {
  1053. !       case 'c':
  1054.         case 'C':
  1055.                 Cave_man[C_ARROWS].trquan = 12 + rnd(9)*rnd(9);
  1056.  
  1057. --- 321,325 -----
  1058.    */
  1059.         switch(pc) {
  1060. !       /* case 'c': */
  1061.         case 'C':
  1062.                 Cave_man[C_ARROWS].trquan = 12 + rnd(9)*rnd(9);
  1063. ***************
  1064. *** 324,328
  1065.                 ini_inv(Cave_man);
  1066.                 break;
  1067. !       case 't':
  1068.         case 'T':
  1069.   #ifdef KAA
  1070.  
  1071. --- 328,332 -----
  1072.                 ini_inv(Cave_man);
  1073.                 break;
  1074. !       /* case 't': */
  1075.         case 'T':
  1076.   #ifdef KAA
  1077. ***************
  1078. *** 343,347
  1079.   #endif
  1080.                 break;
  1081. !       case 'w':
  1082.         case 'W':
  1083.                 for(i = W_MULTSTART; i <= W_MULTEND; i++)
  1084.  
  1085. --- 347,351 -----
  1086.   #endif
  1087.                 break;
  1088. !       /* case 'w': */
  1089.         case 'W':
  1090.                 for(i = W_MULTSTART; i <= W_MULTEND; i++)
  1091. ***************
  1092. *** 359,363
  1093.                 if(!rn2(5)) ini_inv(Blindfold);
  1094.                 break;
  1095. !       case 'a':
  1096.         case 'A':
  1097.                 Fast = INTRINSIC;
  1098.  
  1099. --- 363,367 -----
  1100.                 if(!rn2(5)) ini_inv(Blindfold);
  1101.                 break;
  1102. !       /* case 'a': */
  1103.         case 'A':
  1104.                 Fast = INTRINSIC;
  1105. ***************
  1106. *** 372,376
  1107.                 break;
  1108.   #ifdef KAA
  1109. !       case 'e':
  1110.         case 'E':
  1111.                 Elf[E_ARROWS].trquan = 15+rnd(20);
  1112.  
  1113. --- 376,380 -----
  1114.                 break;
  1115.   #ifdef KAA
  1116. !       /* case 'e': */
  1117.         case 'E':
  1118.                 Elf[E_ARROWS].trquan = 15+rnd(20);
  1119. ***************
  1120. *** 384,388
  1121.                 else if(!rn2(6)) ini_inv(Lamp);
  1122.                 break;
  1123. !       case 'v':
  1124.         case 'V':
  1125.                 Stealth = INTRINSIC;
  1126.  
  1127. --- 388,392 -----
  1128.                 else if(!rn2(6)) ini_inv(Lamp);
  1129.                 break;
  1130. !       /* case 'v': */
  1131.         case 'V':
  1132.                 Stealth = INTRINSIC;
  1133. ***************
  1134. *** 394,398
  1135.                 if(!rn2(6)) ini_inv(Lamp);
  1136.                 break;
  1137. !       case 'h':
  1138.         case 'H':
  1139.                 objects[POT_HEALING].oc_name_known=1;
  1140.  
  1141. --- 398,402 -----
  1142.                 if(!rn2(6)) ini_inv(Lamp);
  1143.                 break;
  1144. !       /* case 'h': */
  1145.         case 'H':
  1146.                 objects[POT_HEALING].oc_name_known=1;
  1147. ***************
  1148. *** 405,409
  1149.                 break;
  1150.   #endif
  1151. !       case 'k':
  1152.         case 'K':
  1153.                 u.uhp = u.uhpmax = 12;
  1154.  
  1155. --- 409,413 -----
  1156.                 break;
  1157.   #endif
  1158. !       /* case 'k': */
  1159.         case 'K':
  1160.                 u.uhp = u.uhpmax = 12;
  1161. ***************
  1162. *** 411,415
  1163.                 ini_inv(Knight);
  1164.                 break;
  1165. !       case 'b':
  1166.         case 'B':
  1167.                 u.uhp = u.uhpmax = 14;
  1168.  
  1169. --- 415,419 -----
  1170.                 ini_inv(Knight);
  1171.                 break;
  1172. !       /* case 'b': */
  1173.         case 'B':
  1174.                 u.uhp = u.uhpmax = 14;
  1175. ***************
  1176. *** 419,423
  1177.                 break;
  1178.   #ifdef NEWCLASS
  1179. !       case 's':
  1180.         case 'S':
  1181.                 Fast = INTRINSIC;
  1182.  
  1183. --- 423,427 -----
  1184.                 break;
  1185.   #ifdef NEWCLASS
  1186. !       /* case 's': */
  1187.         case 'S':
  1188.                 Fast = INTRINSIC;
  1189. ***************
  1190. *** 427,431
  1191.                 ini_inv(Samurai);
  1192.                 break;
  1193. !       case 'n':
  1194.         case 'N':
  1195.                 Fast = INTRINSIC;
  1196.  
  1197. --- 431,435 -----
  1198.                 ini_inv(Samurai);
  1199.                 break;
  1200. !       /* case 'n': */
  1201.         case 'N':
  1202.                 Fast = INTRINSIC;
  1203. ***************
  1204. *** 437,441
  1205.                 if(!rn2(5)) ini_inv(Blindfold);
  1206.                 break;
  1207. !       case 'p':
  1208.         case 'P':
  1209.                 u.uhp = u.uhpmax = 13;
  1210.  
  1211. --- 441,445 -----
  1212.                 if(!rn2(5)) ini_inv(Blindfold);
  1213.                 break;
  1214. !       /* case 'p': */
  1215.         case 'P':
  1216.                 u.uhp = u.uhpmax = 13;
  1217. ***************
  1218. *** 467,470
  1219.  
  1220.   #ifdef WIZARD
  1221.         wiz_inv();
  1222.   #endif
  1223.  
  1224. --- 471,475 -----
  1225.  
  1226.   #ifdef WIZARD
  1227. +       if (wizard)
  1228.                 wiz_inv();
  1229.   #endif
  1230. diff -bc2 write.c Amiga:write.c
  1231. No differences encountered
  1232. diff -bc2 zap.c Amiga:zap.c
  1233. *** zap.c       Wed May  4 15:09:28 1988
  1234. --- Amiga:zap.c   Mon Jul 25 02:30:19 1988
  1235. ***************
  1236. *** 541,547
  1237.                                             zy < 3 || zy > ROWNO-3)
  1238.                                                 break;
  1239. !                                       if(room->typ == HWALL ||
  1240. !                                           room->typ == VWALL){
  1241. !                                               room->typ = ROOM;
  1242.                                                 break;
  1243.                                         }
  1244.  
  1245. --- 541,547 -----
  1246.                                             zy < 3 || zy > ROWNO-3)
  1247.                                                 break;
  1248. !                                       if(RM_TYP(*room) == HWALL ||
  1249. !                                           RM_TYP(*room) == VWALL) {
  1250. !                                               RM_SET_TYP(*room, ROOM);
  1251.                                                 break;
  1252.                                         }
  1253. ***************
  1254. *** 547,553
  1255.                                         }
  1256.                                 } else
  1257. !                               if(room->typ == HWALL || room->typ == VWALL ||
  1258. !                                  room->typ == SDOOR || room->typ == LDOOR){
  1259. !                                       room->typ = DOOR;
  1260.                                         digdepth -= 2;
  1261.                                 } else
  1262.  
  1263. --- 547,553 -----
  1264.                                         }
  1265.                                 } else
  1266. !                               if(RM_TYP(*room) == HWALL || RM_TYP(*room) ==
  1267. VWALL ||
  1268. !                                  RM_TYP(*room) == SDOOR || RM_TYP(*room) ==
  1269. LDOOR) {
  1270. !                                       RM_SET_TYP(*room, DOOR);
  1271.                                         digdepth -= 2;
  1272.                                 } else
  1273. ***************
  1274. *** 552,557
  1275.                                         digdepth -= 2;
  1276.                                 } else
  1277. !                               if(room->typ == SCORR || !room->typ) {
  1278. !                                       room->typ = CORR;
  1279.                                         digdepth--;
  1280.                                 }
  1281.  
  1282. --- 552,557 -----
  1283.                                         digdepth -= 2;
  1284.                                 } else
  1285. !                               if(RM_TYP(*room) == SCORR || !RM_TYP(*room)) {
  1286. !                                       RM_SET_TYP(*room, CORR);
  1287.                                         digdepth--;
  1288.                                 }
  1289. ***************
  1290. *** 638,642
  1291.                 bhitpos.x += ddx;
  1292.                 bhitpos.y += ddy;
  1293. !               typ = levl[bhitpos.x][bhitpos.y].typ;
  1294.                 if(mtmp = m_at(bhitpos.x,bhitpos.y)){
  1295.                         if(sym) {
  1296.  
  1297. --- 638,642 -----
  1298.                 bhitpos.x += ddx;
  1299.                 bhitpos.y += ddy;
  1300. !               typ = RM_TYP(levl[bhitpos.x][bhitpos.y]);
  1301.                 if(mtmp = m_at(bhitpos.x,bhitpos.y)){
  1302.                         if(sym) {
  1303. ***************
  1304. *** 670,674
  1305.         /* leave last symbol unless in a pool */
  1306.         if(sym)
  1307. !          tmp_at(-1, (levl[bhitpos.x][bhitpos.y].typ == POOL) ? -1 : 0);
  1308.         return(0);
  1309.   }
  1310.  
  1311. --- 670,674 -----
  1312.         /* leave last symbol unless in a pool */
  1313.         if(sym)
  1314. !          tmp_at(-1, (RM_TYP(levl[bhitpos.x][bhitpos.y]) == POOL) ? -1 : 0);
  1315.         return(0);
  1316.   }
  1317. ***************
  1318. *** 698,702
  1319.                         return(mtmp);
  1320.                 }
  1321. !               if(!ZAP_POS(levl[bhitpos.x][bhitpos.y].typ)) {
  1322.                         bhitpos.x -= dx;
  1323.                         bhitpos.y -= dy;
  1324.  
  1325. --- 698,702 -----
  1326.                         return(mtmp);
  1327.                 }
  1328. !               if(!ZAP_POS(RM_TYP(levl[bhitpos.x][bhitpos.y]))) {
  1329.                         bhitpos.x -= dx;
  1330.                         bhitpos.y -= dy;
  1331. ***************
  1332. *** 716,720
  1333.                 if(ct % 5 != 0) i++;
  1334.   #ifdef SINKS
  1335. !               if(IS_SINK(levl[bhitpos.x][bhitpos.y].typ))
  1336.                         break;  /* boomerang falls on sink */
  1337.   #endif
  1338.  
  1339. --- 716,720 -----
  1340.                 if(ct % 5 != 0) i++;
  1341.   #ifdef SINKS
  1342. !               if(IS_SINK(RM_TYP(levl[bhitpos.x][bhitpos.y])))
  1343.                         break;  /* boomerang falls on sink */
  1344.   #endif
  1345. ***************
  1346. *** 764,768
  1347.                 sx += dx;
  1348.                 sy += dy;
  1349. !               if((lev = &levl[sx][sy])->typ) Tmp_at(sx,sy);
  1350.                 else {
  1351.                         int bounce = 0;
  1352.  
  1353. --- 764,768 -----
  1354.                 sx += dx;
  1355.                 sy += dy;
  1356. !               if((lev = &levl[sx][sy]), RM_TYP(*lev)) Tmp_at(sx,sy);
  1357.                 else {
  1358.                         int bounce = 0;
  1359. ***************
  1360. *** 769,773
  1361.                         if(cansee(sx-dx,sy-dy))
  1362.                                 pline("The %s bounces!", fltxt);
  1363. !                       if(ZAP_POS(levl[sx][sy-dy].typ))
  1364.                                 bounce = 1;
  1365.                         if(ZAP_POS(levl[sx-dx][sy].typ)) {
  1366.  
  1367. --- 769,773 -----
  1368.                         if(cansee(sx-dx,sy-dy))
  1369.                                 pline("The %s bounces!", fltxt);
  1370. !                       if(ZAP_POS(RM_TYP(levl[sx][sy-dy])))
  1371.                                 bounce = 1;
  1372.                         if(ZAP_POS(RM_TYP(levl[sx-dx][sy]))) {
  1373. ***************
  1374. *** 771,775
  1375.                         if(ZAP_POS(levl[sx][sy-dy].typ))
  1376.                                 bounce = 1;
  1377. !                       if(ZAP_POS(levl[sx-dx][sy].typ)) {
  1378.                                 if(!bounce || rn2(2)) bounce = 2;
  1379.                         }
  1380.  
  1381. --- 771,775 -----
  1382.                         if(ZAP_POS(RM_TYP(levl[sx][sy-dy])))
  1383.                                 bounce = 1;
  1384. !                       if(ZAP_POS(RM_TYP(levl[sx-dx][sy]))) {
  1385.                                 if(!bounce || rn2(2)) bounce = 2;
  1386.                         }
  1387. ***************
  1388. *** 791,795
  1389.                         continue;
  1390.                 }
  1391. !               if(lev->typ == POOL && abstype == 1 /* fire */) {
  1392.                         range -= 3;
  1393.                         lev->typ = ROOM;
  1394.  
  1395. --- 791,795 -----
  1396.                         continue;
  1397.                 }
  1398. !               if(RM_TYP(*lev) == POOL && abstype == 1 /* fire */) {
  1399.                         range -= 3;
  1400.                         RM_SET_TYP(*lev, ROOM);
  1401. ***************
  1402. *** 793,797
  1403.                 if(lev->typ == POOL && abstype == 1 /* fire */) {
  1404.                         range -= 3;
  1405. !                       lev->typ = ROOM;
  1406.                         if(cansee(sx,sy)) {
  1407.                                 mnewsym(sx,sy);
  1408.  
  1409. --- 793,797 -----
  1410.                 if(RM_TYP(*lev) == POOL && abstype == 1 /* fire */) {
  1411.                         range -= 3;
  1412. !                       RM_SET_TYP(*lev, ROOM);
  1413.                         if(cansee(sx,sy)) {
  1414.                                 mnewsym(sx,sy);
  1415. ***************
  1416. *** 800,804
  1417.                                 pline("You hear a hissing sound.");
  1418.                 }
  1419. !               if(lev->typ == POOL && abstype == 3 /* cold */) {
  1420.                         range -= 3;
  1421.                         lev->typ = ROOM;
  1422.  
  1423. --- 800,804 -----
  1424.                                 pline("You hear a hissing sound.");
  1425.                 }
  1426. !               if(RM_TYP(*lev) == POOL && abstype == 3 /* cold */) {
  1427.                         range -= 3;
  1428.                         RM_SET_TYP(*lev, ROOM);
  1429. ***************
  1430. *** 802,806
  1431.                 if(lev->typ == POOL && abstype == 3 /* cold */) {
  1432.                         range -= 3;
  1433. !                       lev->typ = ROOM;
  1434.                         if(cansee(sx,sy)) {
  1435.                                 mnewsym(sx,sy);
  1436.  
  1437. --- 802,806 -----
  1438.                 if(RM_TYP(*lev) == POOL && abstype == 3 /* cold */) {
  1439.                         range -= 3;
  1440. !                       RM_SET_TYP(*lev, ROOM);
  1441.                         if(cansee(sx,sy)) {
  1442.                                 mnewsym(sx,sy);
  1443. ***************
  1444. *** 889,893
  1445.                         stop_occupation();
  1446.                 }
  1447. !               if(!ZAP_POS(lev->typ)) {
  1448.                         int bounce = 0, rmn;
  1449.                         if(cansee(sx,sy)) pline("The %s bounces!",fltxt);
  1450.  
  1451. --- 889,893 -----
  1452.                         stop_occupation();
  1453.                 }
  1454. !               if(!ZAP_POS(RM_TYP(*lev))) {
  1455.                         int bounce = 0, rmn;
  1456.                         if(cansee(sx,sy)) pline("The %s bounces!",fltxt);
  1457. ***************
  1458. *** 897,902
  1459.                                 dy = -dy;
  1460.                         } else {
  1461. !                         if(ZAP_POS(rmn = levl[sx][sy-dy].typ) &&
  1462. !                           (IS_ROOM(rmn) || ZAP_POS(levl[sx+dx][sy-dy].typ)))
  1463.                                 bounce = 1;
  1464.                           if(ZAP_POS(rmn = levl[sx-dx][sy].typ) &&
  1465.  
  1466. --- 897,902 -----
  1467.                                 dy = -dy;
  1468.                         } else {
  1469. !                         if(ZAP_POS(rmn = RM_TYP(levl[sx][sy-dy])) &&
  1470. !                           (IS_ROOM(rmn) ||
  1471. ZAP_POS(RM_TYP(levl[sx+dx][sy-dy]))))
  1472.                                 bounce = 1;
  1473.                           if(ZAP_POS(rmn = RM_TYP(levl[sx-dx][sy])) &&
  1474. ***************
  1475. *** 900,905
  1476.                             (IS_ROOM(rmn) || ZAP_POS(levl[sx+dx][sy-dy].typ)))
  1477.                                 bounce = 1;
  1478. !                         if(ZAP_POS(rmn = levl[sx-dx][sy].typ) &&
  1479. !                           (IS_ROOM(rmn) || ZAP_POS(levl[sx-dx][sy+dy].typ)))
  1480.                                 if(!bounce || rn2(2))
  1481.                                         bounce = 2;
  1482.  
  1483. --- 900,905 -----
  1484.                             (IS_ROOM(rmn) ||
  1485. ZAP_POS(RM_TYP(levl[sx+dx][sy-dy]))))
  1486.                                 bounce = 1;
  1487. !                         if(ZAP_POS(rmn = RM_TYP(levl[sx-dx][sy])) &&
  1488. !                           (IS_ROOM(rmn) ||
  1489. ZAP_POS(RM_TYP(levl[sx-dx][sy+dy]))))
  1490.                                 if(!bounce || rn2(2))
  1491.                                         bounce = 2;
  1492.  
  1493. SHAR_EOF
  1494. #    End of shell archive
  1495. exit 0
  1496. -- 
  1497. Bob Page, U of Lowell CS Dept.  page@swan.ulowell.edu  ulowell!page
  1498. Have five nice days.
  1499.